home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 1 / QRZ Ham Radio Callsign Database - December 1993.iso / ucsd / packet / tcpip / amiga / asrc29k.lha / netuser.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-08  |  1.4 KB  |  51 lines

  1. /* Global structures and constants needed by an Internet user process */
  2. #ifndef    NCONN
  3.  
  4. #include "global.h"
  5.  
  6. #define    NCONN    20        /* Maximum number of open network connections */
  7.  
  8. extern int32 Ip_addr;    /* Our IP address */
  9. extern int Net_error;    /* Error return code */
  10. #define    NONE    0        /* No error */
  11. #define    CON_EXISTS    1    /* Connection already exists */
  12. #define    NO_CONN    2        /* Connection does not exist */
  13. #define    CON_CLOS    3    /* Connection closing */
  14. #define    NO_MEM        4    /* No memory for TCB creation */
  15. #define    WOULDBLK    5    /* Would block */
  16. #define    NOPROTO        6    /* Protocol or mode not supported */
  17. #define    INVALID        7    /* Invalid arguments */
  18.  
  19. #define    INET_EOL    "\r\n"    /* Standard Internet end-of-line sequence */
  20.  
  21. /* Codes for the tcp_open call */
  22. #define    TCP_PASSIVE    0
  23. #define    TCP_ACTIVE    1
  24. #define    TCP_SERVER    2    /* Passive, clone on opening */
  25.  
  26. /* Local IP wildcard address */
  27. #define    INADDR_ANY    0x0L
  28.  
  29. /* Socket structure */
  30. struct socket {
  31.     int32 address;        /* IP address */
  32.     int16 port;        /* port number */
  33. };
  34. #define    NULLSOCK    (struct socket *)0
  35.  
  36. /* Connection structure (two sockets) */
  37. struct connection {
  38.     struct socket local;
  39.     struct socket remote;
  40. };
  41. /* In domain.c: */
  42. int32 dresolve __ARGS((char *name));
  43. int32 resolve __ARGS((char *name));
  44.  
  45. /* In netuser.c: */
  46. int32 aton __ARGS((char *s));
  47. char *inet_ntoa __ARGS((int32 a));
  48. char *pinet __ARGS((struct socket *s));
  49.  
  50. #endif    /* NCONN */
  51.